﻿<script>
    var tempmodel = avalon.define({
        $id: "ZiDian",
        modelData: { "ProcessName": "", "isTemp": "1", "ManageUser": "", "ProcessType": "-1" },
        iswf: false,//是否属于流程表单
        inittemp: function (strId) {
            if (strId) {
                //编辑加载数据
                $.getJSON('/API/VIEWAPI.ashx?Action=LCSP_GETPROCESSBYID', { P1: strId }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempmodel.modelData = resultData.Result;
                        setTimeout(" ComFunJS.initForm()", 500)
                    }
                })
            } else {
                ComFunJS.initForm()
            }
        },//初始化
        SaveData: function (callback) {
            $.post("/API/VIEWAPI.ashx?ACTION=LCSP_ADDPROCESS", { P1: JSON.stringify(tempmodel.modelData.$model), qymodelId: top.model.SelModel.QYModelId, modelCode: top.model.SelModel.ModelCode }, function (result) {
                return callback.call(this, $.parseJSON(result));
            });
        }
    });
</script>
<div class="form-horizontal" ms-controller="ZiDian" style="margin-top:50px;">
    <div class="form-group">
        <label class="col-xs-3 control-label"><i>*</i>自定义表单名称</label>
        <div class="col-xs-8">
            <input type="text" value="" class="span2  form-control szhl_require" ms-duplex="modelData.ProcessName" id="qygg" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-3 control-label">可见范围</label>
        <div class="col-xs-8">
            <input type="text" value="" class="span2  form-control szhl_getPeoples" ms-duplex="modelData.ManageUser" />
            <label class="help-block">只有可见范围内的人员才能创建该表单</label>
        </div>
    </div>
</div>